﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace EventBus.Abstractions
{
    /// <summary>
    /// Event execution context.
    /// </summary>
    public interface IEventHandlerExecutionContext
    {
        void RegisteEventHandler<TEvent, TEventHandler>()
            where TEvent : IEvent
            where TEventHandler : IEventHandler;

        bool IsRegisteEventHandler<TEvent, TEventHandler>()
            where TEvent : IEvent
            where TEventHandler : IEventHandler;

        Task HandleAsync<TEvent>(TEvent @event)
            where TEvent : IEvent;
    }
}
